/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package incredulousmachine;

import java.awt.Dimension;
import javax.swing.JFrame;
import net.phys2d.raw.BodyList;
import net.phys2d.raw.CollisionContext;

/**
 *
 * @author tomase
 */
public class Machine extends JFrame implements CollisionContext  {

    public Machine(){
        super("The Incredulous Machine");
    }
    
    /**
     * Initializes the Incredulous Machine
     */
    private void init() {
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        
        setPreferredSize(new Dimension(600, 600));
    }
    
    /**
     * IPopulates the Incredulous Machine
     */
    private void populate() {
        //add(new IncredulousPanel());
        IncredulousPanel panel = new IncredulousPanel();
        panel.setSize(600, 600);
        
        //addMouseListener(panel);
        add(panel);
    }
    
    /**
     * Puts the incredulous machine on the screen
     */
    private void display() {
        pack();
        setLocationRelativeTo(null);
        setVisible(true);
        
    }
   
    
    public void resolve(BodyList bodies, float dt) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        //Create the game
        
        
        //Create the game-window
        Machine m = new Machine();
        m.init();
        m.populate();
        m.display();
        
        //Start game-loop
        
        //cleanup
    }
}
